﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Script.Serialization;
using Easy.Operation;

namespace Easy.Web.Service.Entity
{
    /// <summary>
    /// GetAttributeList 的摘要说明
    /// </summary>
    public class GetAttributeList : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string entityid = context.Request["entityid"];

            string AttributeId = context.Request["AttributeId"];

            

            if (entityid == null)
            {
                AttributeMap list = EntitySetting_Function.GetAttribute(AttributeId);
                context.Response.Write(list.ToJson());
            }
            else
            {
                 List<AttributeMap> list = EntitySetting_Function.GetAttributeList(entityid);
                 context.Response.Write(list.ToJson());
            }

            


           
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}